<template>
  <div id="app">
    <div id="nav">
      <router-link to="/"></router-link>
    </div>
    <transition name="fade">
      <router-view />
    </transition>
  </div>
</template>

<script>
  export default {
    data() {
      return {}
    },
    created() {
      if(this.$router.path !== '/'){
        this.$router.replace('/')
      }
    }
  }
</script>

<style>
  #app {
    height: 100%;
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
  }
  #nav a {
    font-weight: bold;
    color: #2c3e50;
  }

  #nav a.router-link-exact-active {
    color: #42b983;
  }
  .fade-enter-active, .fade-leave-avtive {
    transition: opacity 1s
  }
  .fade-enter, .fade-leave-to {
    opacity: 0
  }
</style>
